#pragma once

#include "mathlink.h"
#include "errorExtension.h"
#include "variant.h"

/****************************************************************************************
*
*	MathLink GetValue Extension
*
****************************************************************************************/

bool MLGetValue(MLINK mlp, bool* value);
bool MLGetValue(MLINK mlp, size_t* value);
bool MLGetValue(MLINK mlp, long* value);
bool MLGetValue(MLINK mlp, double* value);
bool MLGetValue(MLINK mlp, complex* value);
bool MLGetValue(MLINK mlp, numeric* value);
bool MLGetValue(MLINK mlp, numeric::range* value);
bool MLGetValue(MLINK mlp, char* value);
bool MLGetValue(MLINK mlp, string* value);
bool MLGetValue(MLINK mlp, symbol* value);
bool MLGetValue(MLINK mlp, numeric::list* value);
bool MLGetValue(MLINK mlp, variant::list* value);
bool MLGetValue(MLINK mlp, variant* value);
bool MLGetValue(MLINK mlp, rule* value);
bool MLGetValue(MLINK mlp, rule::list* value);

/****************************************************************************************
*
*	MathLink PutValue Extension
*
****************************************************************************************/

bool MLPutValue(MLINK mlp, const bool &value);
bool MLPutValue(MLINK mlp, const long &value);
bool MLPutValue(MLINK mlp, const size_t &value);
bool MLPutValue(MLINK mlp, const double &value);
bool MLPutValue(MLINK mlp, const complex &value);
bool MLPutValue(MLINK mlp, const numeric &value);
bool MLPutValue(MLINK mlp, const numeric::range &value);
bool MLPutValue(MLINK mlp, const numeric::list &value);
bool MLPutValue(MLINK mlp, const char &value);
bool MLPutValue(MLINK mlp, const string &value);
bool MLPutValue(MLINK mlp, const symbol* value);
bool MLPutValue(MLINK mlp, const variant &value);
bool MLPutValue(MLINK mlp, const variant &value);